#include "..\..\Header\Graphics\fwGraphicsFactory.h"
#include "..\..\Header\Graphics\fwOpenGLESv2.h"

GraphicsContent * GraphicsFactory::m_pLib = NULL;
GraphicsFactory * GraphicsFactory::m_pInstance = NULL;

GraphicsFactory * GraphicsFactory::GetInstance()
{
	if (!m_pInstance)
		m_pInstance = new GraphicsFactory();
	return m_pInstance;
}

void GraphicsFactory::DestroyInstance()
{
	SAFE_DEL(m_pInstance);
}

GraphicsContent * GraphicsFactory::CreateLib(GraphicsType type)
{
	switch (type)
	{
	case GraphicsType::GLESv2:
		m_pLib = new OpenGLESv2();
		break;
	default:
		break;
	}
	return m_pLib;
}